import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
  path: '/stb',
  name: 'stb',
  meta,
  redirect: { name: 'stb-index' },
  component: layoutHeaderAside,
  children: (pre => [
    { path: 'brand', name: `${pre}brand`, component: _import('stb/brand/index.vue'), meta: { ...meta, title: '品牌' } },
    { path: 'model', name: `${pre}model`, component: _import('stb/model/index.vue'), meta: { ...meta, title: '型号' } },
    { path: 'stbType', name: `${pre}stbType`, component: _import('stb/stbType/index.vue'), meta: { ...meta, title: '类型' } }
  ])('stb-')
}
